<?php
class count{
public $count=0;

public function go(){
echo $this->count."<br/>";
$this->count+=1;
}


}

$count_a=new count();
$count_a->go();
$count_a->go();
$count_a->go();
$count_a->go();
$count_a->go();

?>